/* ================================================================
   unified.css — 微投标全站统一样式系统 v2
   包含：主题变量(浅色/深色)、统一头部、统一左侧栏(含收起/图标模式)、
         统一底部导航、统一移动端App栏、通用组件
   所有页面引入此文件即可获得与 index.html 一致的视觉风格
   v2：提升特异性，与页面内联样式共存；统一侧栏宽度/搜索条高度/主题按钮尺寸
   ================================================================ */

/* ===== 主题变量 ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #10B981;
    --neutral: #64748b;
    --neutral-light: #f8fafc;
    --neutral-dark: #334155;
    --shadow: 0 4px 16px rgba(0,0,0,0.05);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.1);
    --radius: 5px;
    --transition: all 0.2s ease;
    --disabled-bg: #f3f4f6;
    --disabled-color: #9ca3af;

    --bg-body: #f5f7fb;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-header: rgba(255,255,255,0.9);
    --bg-hover: #fafcff;
    --bg-input: #ffffff;
    --bg-chip: rgba(255,255,255,0.16);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-link: #0f172a;
    --border-color: #e2e8f0;
    --border-light: #f0f2f5;
    --divider: rgba(59,130,246,0.1);
    --table-header-bg: #f1f5f9;
    --table-header-text: #475569;
    --table-row-border: #f1f5f9;
    --table-row-hover: #f8fafc;
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #1e293b;
    --bg-header: rgba(15,23,42,0.92);
    --bg-hover: #1e293b;
    --bg-input: #334155;
    --bg-chip: rgba(255,255,255,0.1);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-link: #f8fafc;
    --border-color: #334155;
    --border-light: #1e293b;
    --divider: rgba(255,255,255,0.08);
    --table-header-bg: #1e293b;
    --table-header-text: #cbd5e1;
    --table-row-border: #334155;
    --table-row-hover: #1e293b;
    --neutral-light: #1e293b;
    --disabled-bg: #334155;
    --disabled-color: #64748b;
}

/* ===== 基础重置 ===== */
.unified-shell * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    min-width: 320px;
    padding-bottom: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}
@media (min-width: 1181px) { body { padding-bottom: 0; } }
@media (max-width: 1180px) { body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); } }

/* ===== 统一头部 ===== */
.unified-header,
body header.unified-header,
body .unified-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: var(--bg-header) !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid var(--divider);
    position: relative;
    z-index: 100;
    transition: background-color 0.2s ease;
    display: block !important;
}
.unified-header .header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
}
.unified-logo,
body .unified-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.unified-logo h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}
.unified-nav ul {
    display: flex;
    list-style: none;
    gap: 14px;
    align-items: center;
    margin: 0;
    padding: 0;
}
.unified-nav a {
    color: var(--neutral);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
.unified-nav a:hover { color: var(--primary); }

/* 中十环图标 */
.zhongshihuan-icon { width: 32px; height: 32px; position: relative; }
.zhongshihuan-icon .outer-ring { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 28px; height: 28px; border: 4px solid var(--primary); border-radius: 50%; opacity: 0.3; }
.zhongshihuan-icon .middle-ring { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 18px; height: 18px; border: 3px solid var(--primary); border-radius: 50%; opacity: 0.6; }
.zhongshihuan-icon .inner-dot { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 7px; height: 7px; background-color: var(--primary); border-radius: 50%; }

/* ===== 主题切换按钮 — 全站统一尺寸和位置 ===== */
.theme-toggle,
body .theme-toggle {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    transition: all 0.2s ease;
    padding: 0 !important;
    -webkit-appearance: none;
    appearance: none;
}
.theme-toggle:hover { background: var(--primary-light) !important; color: var(--primary) !important; border-color: var(--primary) !important; }
.theme-toggle i { transition: transform 0.3s ease; }
.theme-toggle:active i { transform: scale(0.85); }

/* 头部用户图标（与主题按钮同尺寸 34px 圆形）*/
.user-avatar-nav,
body .user-avatar-nav { width: 34px !important; height: 34px !important; border-radius: 50% !important; object-fit: cover; }
.user-icon-nav, body .user-icon-nav { font-size: 22px !important; color: var(--text-secondary); }
.unified-nav a i.fa-user-circle, .unified-nav a .fa-user-circle { font-size: 22px !important; }

/* ===== 统一左侧栏（高特异性！important 覆盖页面内联样式） ===== */
.unified-sidebar,
body .left-sidebar,
body .unified-sidebar,
body .left-sidebar.unified-sidebar {
    flex-shrink: 0 !important;
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
    background: var(--bg-sidebar) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    padding: 14px 12px !important;
    align-self: flex-start !important;
    border: 1px solid var(--border-light) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    transition: all 0.25s cubic-bezier(0.22,1,0.36,1);
    position: relative !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}
body .left-sidebar.collapsed,
body .unified-sidebar.collapsed {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    padding: 0 !important;
    opacity: 1 !important;
    overflow: visible !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    gap: 0 !important;
}

/* 展开态侧栏内容多时允许纵向滚动（不破坏收起态的图标栏定位） */
body .left-sidebar:not(.collapsed),
body .unified-sidebar:not(.collapsed) {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}
body .left-sidebar:not(.collapsed)::-webkit-scrollbar,
body .unified-sidebar:not(.collapsed)::-webkit-scrollbar { width: 4px; }
body .left-sidebar:not(.collapsed)::-webkit-scrollbar-thumb,
body .unified-sidebar:not(.collapsed)::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

/* 收起状态：隐藏所有内容区 */
body .left-sidebar.collapsed > *,
body .left-sidebar.collapsed .sidebar-section,
body .left-sidebar.collapsed .sidebar-filter-section,
body .left-sidebar.collapsed .mode-section,
body .left-sidebar.collapsed .mode-options,
body .left-sidebar.collapsed .settings-section,
body .left-sidebar.collapsed .section-title,
body .left-sidebar.collapsed .filter-section {
    display: none !important;
}
/* 收起状态：只显示图标栏 */
body .left-sidebar.collapsed .sidebar-icons-bar,
body .unified-sidebar.collapsed .sidebar-icons-bar {
    display: flex !important;
}

/* 左侧栏切换按钮（34px 圆形，与主题按钮/头像一致，避免小到点不动） */
.sidebar-toggle-btn,
body .sidebar-toggle-btn {
    position: absolute !important;
    right: -16px !important;
    top: 12px !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important; min-height: 34px !important;
    border-radius: 50% !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    z-index: 100 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
    transition: all 0.25s cubic-bezier(0.22,1,0.36,1) !important;
    padding: 0 !important;
    flex-direction: row !important;
    opacity: 1 !important;
}
.unified-sidebar:hover .sidebar-toggle-btn,
body .left-sidebar:hover .sidebar-toggle-btn { opacity: 1; transform: scale(1.05); }
.sidebar-toggle-btn:hover { background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; box-shadow: 0 4px 12px rgba(37,99,235,0.35) !important; }
.sidebar-toggle-btn i { transition: transform 0.3s ease; }

/* 收起按钮：移到侧栏左外侧（圆形始终可见可点） */
body .left-sidebar.collapsed .sidebar-toggle-btn,
body .unified-sidebar.collapsed .sidebar-toggle-btn {
    right: -16px !important; left: auto !important;
    top: 12px !important;
    transform: rotate(180deg) !important;
    opacity: 1 !important;
    display: flex !important;
}

/* 图标栏（收起状态） */
.sidebar-icons-bar,
body .sidebar-icons-bar {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 36px 0 6px 0;
    width: 100%;
}
.sidebar-icon-item,
body .sidebar-icon-item {
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.sidebar-icon-item:hover { background: var(--bg-hover); color: var(--primary); }
.sidebar-icon-item.active { background: var(--primary-light); color: var(--primary); }
.sidebar-icon-item i { font-size: 14px !important; }
.sidebar-icon-item::after {
    content: attr(data-tip);
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary);
    color: var(--bg-card);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 100;
}
.sidebar-icon-item:hover::after { opacity: 1; }

/* 侧栏区块 */
.sidebar-section,
body .sidebar-section,
body .sidebar-filter-section {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
}
.sidebar-section:last-child { border-bottom: none; }
.sidebar-section-title,
body .sidebar-section-title,
body .section-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    margin-bottom: 10px !important;
    display: flex !important;
    align-items: center;
    gap: 6px;
    line-height: 1.3 !important;
    padding: 0 !important;
    background: transparent !important;
    cursor: default;
}
.sidebar-section-title i,
body .sidebar-section-title i,
body .section-title i {
    color: var(--primary) !important;
    font-size: 14px !important;
}

/* 统一菜单项 */
.unified-menu-item,
body .unified-menu-item,
body .mode-single-item,
body .mode-parent-item,
body .mode-sub-option,
body .menu-item,
body .mode-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px !important;
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--neutral-light) !important;
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    transition: background 0.15s ease;
    text-decoration: none;
    margin-bottom: 3px !important;
    line-height: 1.3 !important;
    min-height: 32px;
}
.unified-menu-item i { width: 20px !important; font-size: 15px !important; }
.unified-menu-item:hover { background: var(--bg-hover) !important; color: var(--primary) !important; }
.unified-menu-item.active,
body .unified-menu-item.active,
body .unified-menu-item.active.unified-menu-item {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%) !important;
    color: #fff !important; font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25) !important;
    border-left: 3px solid var(--primary-dark, #1d4ed8) !important;
    padding-left: 7px !important;
}
.unified-menu-item.active i,
body .unified-menu-item.active i { color: #fff !important; }
.unified-menu-item.active:hover,
body .unified-menu-item.active:hover { background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%) !important; color: #fff !important; }
[data-theme="dark"] .unified-menu-item.active,
[data-theme="dark"] body .unified-menu-item.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #fff !important;
}

/* 筛选区块 */
.filter-item-side,
body .filter-item-side { margin-bottom: 12px !important; }
.filter-item-side label,
body .filter-item-side label {
    display: flex !important;
    align-items: center;
    gap: 5px;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    margin-bottom: 6px !important;
    padding: 0 !important;
}
.filter-item-side label i,
body .filter-item-side label i { color: var(--primary); width: 18px; }
.filter-item-side select, .filter-item-side input,
body .filter-item-side select, body .filter-item-side input {
    width: 100% !important;
    padding: 8px 10px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius) !important;
    font-size: 12px !important;
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
}
.filter-item-side select:focus, .filter-item-side input:focus,
body .filter-item-side select:focus, body .filter-item-side input:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.filter-item-side select:disabled, .filter-item-side input:disabled { background-color: var(--disabled-bg); color: var(--disabled-color); cursor: not-allowed; opacity: 0.8; }
.filter-buttons-side { margin-top: 6px; }
.btn-side,
body .btn-side {
    width: 100%;
    padding: 7px 12px !important;
    border-radius: var(--radius) !important;
    font-size: 12px !important;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    background: var(--bg-card) !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    transition: all 0.15s ease;
}
.btn-side:hover { background: var(--primary-light) !important; }

/* ===== 统一主区域 + 搜索条 ===== */
.content-layout,
body .content-layout,
body .main-layout {
    display: flex !important;
    gap: 16px !important;
    margin-top: 16px !important;
    margin-bottom: 16px !important;
    transition: gap 0.25s ease;
    width: 100%;
}
.right-content,
body .right-content {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex;
    flex-direction: column;
    transition: all 0.25s cubic-bezier(0.22,1,0.36,1);
}

/* 统一搜索条（在right-content 内首屏） */
.search-bar-right,
body .search-bar-right {
    background: var(--bg-card) !important;
    border-radius: var(--radius) !important;
    padding: 4px !important;
    display: flex;
    align-items: center;
    gap: 0;
    box-shadow: var(--shadow) !important;
    border: 1px solid var(--border-color) !important;
    margin-bottom: 16px !important;
    height: 44px !important;
    flex-shrink: 0;
}
.search-bar-right input,
body .search-bar-right input {
    flex: 1;
    border: none;
    padding: 0 12px !important;
    font-size: 13px !important;
    outline: none;
    background: transparent !important;
    color: var(--text-primary);
    height: 100%;
    min-width: 0;
}
.search-bar-right input::placeholder,
body .search-bar-right input::placeholder { color: var(--text-tertiary); }
.search-bar-right .search-icon,
body .search-bar-right .search-icon {
    background: var(--primary) !important;
    color: white;
    width: 32px !important;
    height: 32px !important;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 2px;
    transition: background 0.15s ease;
    flex-shrink: 0;
    font-size: 14px;
}
.search-bar-right .search-icon:hover { background: var(--primary-dark) !important; transform: scale(1.02); }

/* ===== 统一底部导航 (UNIFIED-BOTTOM-NAV v2) ===== */
.bottom-nav {
    position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100% !important; box-sizing: border-box !important;
    height: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 0 !important; max-height: none !important;
    margin: 0 !important; padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
    background: rgba(255,255,255,0.92) !important;
    -webkit-backdrop-filter: blur(20px) !important; backdrop-filter: blur(20px) !important;
    border: 0 !important; border-top: 1px solid rgba(0,0,0,0.06) !important;
    box-shadow: 0 -1px 8px rgba(0,0,0,0.05) !important;
    z-index: 1000 !important;
    justify-content: space-between !important; align-items: stretch !important;
    transition: none !important; animation: none !important; transform: none !important;
    display: none;
}
@media (min-width: 1181px) { .bottom-nav { display: none !important; } }
@media (max-width: 1180px) {
    .bottom-nav { display: flex !important; }
    body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important; }

    /* ========== 移动端：彻底隐藏 PC 头部/侧栏/按钮（含 social/explore 的裸 header） ========== */
    body .unified-header,
    body > header,
    body .app-wrapper > header,
    body > .app-wrapper > header { display: none !important; }

    /* ========== 移动端：隐藏侧栏（含 PC 模式的所有侧栏类名） ========== */
    body .left-sidebar,
    body .unified-sidebar,
    body .sidebar-filter-section,
    body .main-layout > .left-sidebar,
    body .main-layout > .unified-sidebar,
    body .grid > .left-sidebar,
    body .layout > .left-sidebar,
    body .app-wrapper > .left-sidebar,
    body .app-wrapper > .unified-sidebar,
    body .app-wrapper > aside,
    body .filter-panel-left,
    body aside.sidebar,
    body .sidebar { display: none !important; }

    /* ========== 移动端：隐藏 sidebar-icons-bar 与sidebar切换按钮 ========== */
    body .sidebar-icons-bar,
    body .sidebar-toggle-btn { display: none !important; }

    /* ========== 移动端：让所有页面主内容区占满整宽 ========== */
    body .right-content,
    body .main-content,
    body .content-area,
    body .app-wrapper > .right-content,
    body .main-layout,
    body .layout,
    body .grid,
    body .app-wrapper { width: 100% !important; max-width: 100% !important; flex: 1 1 auto !important; min-width: 0 !important; box-sizing: border-box !important; }

    /* ========== 移动端：让 social.html 的 .social-header 显示 ========== */
    body .social-header { display: flex !important; }

    /* ========== 移动端：让 explore.html 的 m-profile-header/m-menu-list 显示 ========== */
    body .m-profile-header,
    body .m-menu-list { display: block !important; }

    /* ========== 移动端：explore PC 侧栏菜单隐藏 ========== */
    body .sidebar-menu { display: none !important; }

    /* ========== 移动端：隐藏 explorer 内部被双横线挤掉的card ========== */
    body .explore-card { display: none !important; }

    /* ========== 移动端：explore 表单弹出强制全屏底部弹出（避免PC居中布局） ========== */
    body .fullscreen-panel { align-items: flex-end !important; }
    body .panel-content { max-width: 100% !important; border-radius: 16px 16px 0 0 !important; height: auto !important; max-height: 90vh !important; }
    body .modal { align-items: flex-end !important; justify-content: center !important; padding: 0 !important; }
    body .modal-content { border-radius: 16px 16px 0 0 !important; padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important; }

    /* ========== 移动端：xypjjg 4列 stack 卡 → 单列堆叠 ========== */
    body .left-stats-grid,
    body .stats-grid,
    body .stats-cards,
    body .stat-row { display: flex !important; flex-direction: column !important; gap: 10px !important; }
    body .left-stats-grid > *,
    body .stats-grid > *,
    body .stats-cards > *,
    body .stat-row > * { width: 100% !important; max-width: 100% !important; }

    /* ========== 移动端：所有带 grid/flex 的内容块单列 ========== */
    body .data-list-section,
    body .content-list,
    body .detail-grid,
    body .cards-row { grid-template-columns: 1fr !important; flex-direction: column !important; }

    /* ========== 移动端：去除横向溢出 ========== */
    body { overflow-x: hidden !important; }

    /* ========== 移动端：相对让 input-area 通过 .show-fab 显示 ========== */
    body .input-area { display: none !important; }
    body .input-area.show-fab { display: flex !important; }
}
.bottom-nav .nav-item {
    flex: 1 1 0 !important; min-width: 0 !important; max-width: none !important;
    height: 60px !important; box-sizing: border-box !important;
    display: flex !important; flex-direction: column !important;
    align-items: center !important; justify-content: center !important;
    gap: 4px !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
    background: transparent !important; color: #64748b !important;
    font-size: 12px !important; line-height: 1 !important; font-weight: 400 !important;
    text-align: center !important; text-decoration: none !important;
    opacity: 1 !important; position: relative !important; overflow: visible !important;
    transition: none !important; animation: none !important; transform: none !important;
    -webkit-tap-highlight-color: transparent !important; cursor: pointer !important;
}
.bottom-nav .nav-item i {
    font-size: 22px !important; width: 24px !important; height: 24px !important;
    line-height: 24px !important; display: block !important; text-align: center !important;
    margin: 0 !important; padding: 0 !important; transition: none !important;
}
.bottom-nav .nav-item .zhongshihuan-nav-icon {
    width: 24px !important; height: 24px !important; position: relative !important;
    display: block !important; margin: 0 !important; padding: 0 !important; font-size: 0 !important;
}
.bottom-nav .nav-item .zhongshihuan-nav-icon .outer-ring {
    position: absolute !important; top: 50% !important; left: 50% !important;
    transform: translate(-50%,-50%) !important; width: 20px !important; height: 20px !important;
    border: 2.5px solid currentColor !important; border-radius: 50% !important;
    opacity: .3 !important; background: transparent !important;
}
.bottom-nav .nav-item .zhongshihuan-nav-icon .middle-ring {
    position: absolute !important; top: 50% !important; left: 50% !important;
    transform: translate(-50%,-50%) !important; width: 13px !important; height: 13px !important;
    border: 2px solid currentColor !important; border-radius: 50% !important;
    opacity: .6 !important; background: transparent !important;
}
.bottom-nav .nav-item .zhongshihuan-nav-icon .inner-dot {
    position: absolute !important; top: 50% !important; left: 50% !important;
    transform: translate(-50%,-50%) !important; width: 5px !important; height: 5px !important;
    background-color: currentColor !important; border: 0 !important; border-radius: 50% !important; opacity: 1 !important;
}
.bottom-nav .nav-item .nav-label {
    display: block !important; height: 16px !important; line-height: 16px !important;
    font-size: 12px !important; font-weight: 400 !important; margin: 0 !important; padding: 0 !important;
    white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
    max-width: 100% !important; color: inherit !important;
}
.bottom-nav .nav-item::before {
    content: '' !important; position: absolute !important;
    top: 0 !important; bottom: auto !important; left: 50% !important; right: auto !important;
    margin: 0 0 0 -11px !important; transform: none !important;
    width: 22px !important; height: 3px !important; border-radius: 0 0 2px 2px !important;
    background: transparent !important; box-shadow: none !important;
    opacity: 1 !important; transition: none !important; animation: none !important;
}
.bottom-nav .nav-item::after { content: none !important; }
.bottom-nav .nav-item.active { color: #2563eb !important; }
.bottom-nav .nav-item.active::before { background: #2563eb !important; }

/* 深色模式底部导航 */
[data-theme="dark"] .bottom-nav {
    background: rgba(18,27,44,0.92) !important; border-top-color: rgba(255,255,255,0.06) !important;
    box-shadow: 0 -1px 8px rgba(0,0,0,0.35) !important;
}
[data-theme="dark"] .bottom-nav .nav-item { color: #94a3b8 !important; }
[data-theme="dark"] .bottom-nav .nav-item.active { color: #60a5fa !important; }
[data-theme="dark"] .bottom-nav .nav-item.active::before { background: #60a5fa !important; }

/* ===== 统一移动端 App 栏 ===== */
.m-appbar {
    position: sticky; top: 0; z-index: 1100;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 10px;
    box-shadow: 0 4px 16px rgba(37,99,235,0.18);
    transition: transform 0.25s cubic-bezier(0.22,1,0.36,1);
}
.m-appbar.hidden { transform: translateY(-100%); }
.m-search-row {
    display: flex; align-items: center;
    background: rgba(255,255,255,0.96); border-radius: 10px;
    height: 38px; padding: 0 12px;
    gap: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.m-search-row > i { color: #9ca3af; font-size: 15px; flex-shrink: 0; }
.m-search-row input {
    flex: 1; min-width: 0; border: none; outline: none; background: transparent;
    font-size: 14px; color: var(--text-primary); height: 100%;
}
.m-search-row input::placeholder { color: #b0b7c3; }
.m-toolbar {
    display: flex; align-items: center; gap: 8px;
    margin-top: 8px; height: 34px;
}
.m-mode-pill {
    flex-shrink: 0; display: flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,0.20); color: #fff;
    border-radius: 10px; padding: 0 10px; height: 30px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    border: none; outline: none; white-space: nowrap;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    transition: background 0.15s ease, transform 0.1s ease;
}
.m-mode-pill:active { background: rgba(255,255,255,0.32); transform: scale(0.97); }
.m-mode-pill i { font-size: 11px; opacity: 0.85; }
.m-chips-wrap {
    flex: 1; min-width: 0; display: flex; align-items: center;
    justify-content: center; gap: 6px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding: 0 2px;
}
.m-chips-wrap::-webkit-scrollbar { display: none; }
.m-chip {
    flex-shrink: 0; padding: 0 11px; border-radius: 10px; font-size: 12px;
    background: rgba(255,255,255,0.16); color: rgba(255,255,255,0.85);
    border: none; cursor: pointer; transition: all 0.18s ease;
    white-space: nowrap; height: 28px; display: flex; align-items: center; line-height: 1;
    font-weight: 500;
}
.m-chip.active { background: #fff; color: var(--primary); font-weight: 600; }
.m-chip:active { transform: scale(0.95); }
.m-filter-btn {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px;
    background: rgba(255,255,255,0.20); color: #fff; border: none; outline: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 15px;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    transition: background 0.15s ease, transform 0.1s ease;
}
.m-filter-btn:active { background: rgba(255,255,255,0.32); transform: scale(0.95); }
.theme-toggle-mobile {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px;
    background: rgba(255,255,255,0.20); color: #fff; border: none; outline: none;
    display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    transition: background 0.15s ease, transform 0.1s ease;
}
.theme-toggle-mobile:active { background: rgba(255,255,255,0.32); transform: scale(0.95); }

/* ===== 移动端面板（底部弹层） ===== */
.fullscreen-panel {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.40); z-index: 2000;
    display: none; justify-content: center; align-items: flex-end;
}
.fullscreen-panel.show { display: flex; }
.panel-content {
    background: var(--bg-card); width: 100%; max-height: 75vh;
    border-radius: 16px 16px 0 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
    animation: panelSlideUp 0.28s cubic-bezier(0.22,1,0.36,1);
}
@keyframes panelSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.panel-handle { width: 36px; height: 4px; background: var(--border-color); border-radius: 2px; margin: 10px auto 6px; flex-shrink: 0; }
.panel-header { padding: 4px 20px 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-light); }
.panel-header span { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.panel-header .close-btn { width: 28px; height: 28px; border-radius: 8px; background: var(--bg-hover); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); font-size: 14px; transition: background 0.15s; }
.panel-header .close-btn:active { background: var(--border-color); }
.panel-body { padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px)); }

/* ===== 通用组件 ===== */
.loading { display: none; text-align: center; padding: 40px; }
.spinner { width: 44px; height: 44px; border: 3px solid var(--border-color); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 40px; color: var(--neutral); }

/* 搜索高亮 */
.search-highlight { background-color: #eff6ff; color: #2563eb; padding: 0 2px; border-radius: 2px; font-weight: 500; }

/* placeholder 颜色适配主题 */
::placeholder { color: var(--text-tertiary); opacity: 0.7; }
::-webkit-input-placeholder { color: var(--text-tertiary); opacity: 0.7; }
:-ms-input-placeholder { color: var(--text-tertiary); opacity: 0.7; }

/* ===== 深色模式额外覆盖 ===== */
[data-theme="dark"] .search-highlight { background-color: rgba(37,99,235,0.25); color: #93bbfc; }
[data-theme="dark"] .empty-state { color: var(--text-secondary); }
[data-theme="dark"] .loading p { color: var(--text-secondary); }
[data-theme="dark"] .m-appbar { background: var(--bg-card); border-bottom: 1px solid var(--border-color); box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
[data-theme="dark"] .m-search-row { background: var(--bg-input); box-shadow: none; }
[data-theme="dark"] .m-search-row > i { color: var(--text-tertiary); }
[data-theme="dark"] .m-search-row input::placeholder { color: var(--text-tertiary); }
[data-theme="dark"] .m-mode-pill, [data-theme="dark"] .m-filter-btn { background: var(--bg-input); color: var(--text-primary); }
[data-theme="dark"] .m-mode-pill:active, [data-theme="dark"] .m-filter-btn:active { background: var(--bg-hover); }
[data-theme="dark"] .m-chip { background: var(--bg-input); color: var(--text-secondary); }
[data-theme="dark"] .m-chip.active { background: var(--primary); color: #fff; }
[data-theme="dark"] .theme-toggle-mobile { background: var(--bg-input); color: var(--text-primary); }
[data-theme="dark"] .fullscreen-panel { background: rgba(0,0,0,0.55); }
[data-theme="dark"] .panel-content { background: var(--bg-card); box-shadow: 0 -8px 32px rgba(0,0,0,0.35); }
[data-theme="dark"] .panel-handle { background: var(--border-color); }
[data-theme="dark"] .panel-header { border-bottom-color: var(--border-color); }
[data-theme="dark"] .panel-header span { color: var(--text-primary); }
[data-theme="dark"] .panel-header .close-btn { background: var(--bg-hover); color: var(--text-secondary); }
[data-theme="dark"] .panel-header .close-btn:active { background: var(--border-color); }
[data-theme="dark"] .unified-menu-item.active,
[data-theme="dark"] .menu-item.active,
[data-theme="dark"] .mode-single-item.active,
[data-theme="dark"] .mode-parent-item.active,
[data-theme="dark"] .mode-sub-option.active { background: rgba(37,99,235,0.15) !important; color: var(--primary) !important; }
[data-theme="dark"] .sidebar-icon-item { color: var(--text-secondary); }
[data-theme="dark"] .sidebar-icon-item:hover { background: var(--bg-hover); color: var(--primary); }
[data-theme="dark"] .sidebar-icon-item.active { background: rgba(37,99,246,0.20); color: var(--primary); }
[data-theme="dark"] .sidebar-icon-item::after { background: var(--text-primary); color: var(--bg-card); }
[data-theme="dark"] .search-bar-right input { color: var(--text-primary); }
[data-theme="dark"] body { background-color: var(--bg-body); color: var(--text-primary); }
[data-theme="dark"] header, [data-theme="dark"] .unified-header { background-color: var(--bg-header) !important; border-bottom-color: var(--divider); }
[data-theme="dark"] footer { background-color: var(--bg-card); border-top-color: var(--border-color); }

/* ===== 设置面板样式（用于explore.html等页） ===== */
.settings-panel-card {
    background: var(--bg-card); border-radius: 8px; padding: 16px;
    border: 1px solid var(--border-color); margin-bottom: 12px;
}
.settings-panel-card h4 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.settings-panel-card h4 i { color: var(--primary); }
.settings-theme-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.settings-theme-row .theme-label { font-size: 14px; color: var(--text-primary); font-weight: 500; }
.settings-theme-row .theme-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.theme-switch-group { display: flex; gap: 8px; }
.theme-option-btn {
    padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 500;
    border: 1.5px solid var(--border-color); background: var(--bg-card); color: var(--text-secondary);
    cursor: pointer; transition: all 0.18s ease; display: flex; align-items: center; gap: 6px;
}
.theme-option-btn:hover { border-color: var(--primary); color: var(--primary); }
.theme-option-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.theme-option-btn i { font-size: 14px; }

/* ===== 社区浮动按钮（移动端发帖入口） ===== */
.social-fab {
    position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    width: 56px !important; height: 56px !important; border-radius: 50% !important;
    background: linear-gradient(135deg, var(--primary), #1d4ed8) !important;
    color: #fff !important; border: none !important; cursor: pointer !important;
    display: none; align-items: center; justify-content: center;
    font-size: 24px !important; box-shadow: 0 4px 16px rgba(37,99,235,0.35);
    z-index: 999; transition: transform 0.15s ease;
    padding: 0 !important;
}
.social-fab:active { transform: scale(0.92); }
@media (max-width: 1180px) { .social-fab { display: flex !important; } }
.social-fab i { color: #fff; font-size: 24px; }

/* PC端不显示 FAB */
@media (min-width: 1181px) { .social-fab { display: none !important; } }

/* 移动端覆盖样式：FAB点击后展开输入区 */
@media (max-width: 1180px) {
    .input-area { display: none !important; }
    .input-area.show-fab { display: flex !important; }
}

/* ===== zywz 内容区网格（让它能显示） ===== */
body .grid-container {
    flex: 1;
    overflow: auto;
    padding: 12px 16px;
    background: transparent;
}
body .right-content > .search-bar-wrapper {
    background: rgba(255,255,255,0.95);
    padding: 4px 4px 4px 16px;
    border-bottom: 1px solid #eef2f6;
    flex-shrink: 0;
}
body .search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
}
body .search-bar select { border: none; padding: 5px 10px; font-size: 13px; background: transparent; color: var(--neutral-dark); outline: none; cursor: pointer; }
body .search-bar input { flex: 1; border: none; padding: 0 8px; font-size: 14px; outline: none; background: transparent; color: var(--text-primary); min-width: 0; }
body .search-bar .search-icon { background: var(--primary); color: white; width: 32px; height: 32px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
body .search-bar .search-icon:hover { background: var(--primary-dark); }

/* ===== 详情页/其它页面通用按钮 ===== */
body .theme-toggle.btn, body .theme-toggle[onclick] { display: inline-flex !important; }
